<?php
/**
 * Created by JetBrains PhpStorm.
 * User: thanhdx
 * Date: 13/07/2011
 * Time: 16:21
 * To change this template use File | Settings | File Templates.
 */
?>
<?php
$this->pageTitle = Yii::app()->name . ' - Đăng ký';
$this->breadcrumbs = array(
    'Đăng ký',
);
?>
<?php if(Yii::app()->user->hasFlash('register')): ?>

<div class="flash-success">
    <?php echo Yii::app()->user->getFlash('register'); ?>
</div>

<?php endif; ?>
<?php if(!$registered){?>
<?php $form = $this->beginWidget('CActiveForm', array(
                                                     'id' => 'register-form',
                                                     'enableClientValidation' => true,
                                                     'clientOptions' => array(
                                                         'validateOnSubmit' => true,
                                                     ),
                                                )); ?>
<div class="form">
    <div class="row">
        <?php echo $form->labelEx($model, 'email'); ?>
        <?php echo $form->textField($model, 'email'); ?>
        <?php echo $form->error($model, 'email'); ?>
        <p class="hint">
            Please enter your email address.
        </p>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'password'); ?>
        <?php echo $form->passwordField($model, 'password'); ?>
        <?php echo $form->error($model, 'password'); ?>

    </div>
    <div class="row buttons">
		<?php echo CHtml::submitButton('Register'); ?>
	</div>
</div>
<?php $this->endWidget(); ?>
<?php } ?>